package de.godlike.services.internal.dataTypes;

/**
 * This class represents a process running on Windows-OS. It holds the name, pid
 * and memory usage of the process.
 * 
 * @author asmodaeus
 * 
 */
public class WinProcess {
	/**
	 * process-name
	 */
	private String name;
	/**
	 * process-id
	 */
	private int pid;
	/**
	 * memory, the process uses
	 */
	private String memUse;

	/**
	 * creates an empty new process.
	 */
	public WinProcess() {

	}

	/**
	 * creates a new process with the given information
	 * 
	 * @param name
	 *            name of the process
	 * @param pid
	 *            id of the process
	 * @param memUse
	 *            memory, the process uses
	 */
	public WinProcess(String name, int pid, String memUse) {
		this.setName(name);
		this.setPid(pid);
		this.setMemUse(memUse);
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return this.name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the pic
	 */
	public int getPid() {
		return this.pid;
	}

	/**
	 * @param pid
	 *            the pid to set
	 */
	public void setPid(int pid) {
		this.pid = pid;
	}

	/**
	 * @return the memUse
	 */
	public String getMemUse() {
		return this.memUse;
	}

	/**
	 * @param memUse
	 *            the memUse to set
	 */
	public void setMemUse(String memUse) {
		this.memUse = memUse;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return this.getName() + "(" + this.getPid() + "): " + this.getMemUse();
	}
}